/* MERARY promo choice — checkout sidebar widget */
body.cart-exact .promo-choice {
  padding: 0;
  overflow: hidden;
  border: 1px solid #f0dfe3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(83, 42, 52, 0.04);
}

body.cart-exact .promo-choice__input-block {
  padding: 18px 20px 15px;
}

body.cart-exact .promo-choice__title {
  margin: 0 0 10px 31px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #242021;
}

body.cart-exact .promo-choice__row {
  display: grid;
  grid-template-columns: 24px 1fr 106px;
  gap: 9px;
  align-items: center;
}

body.cart-exact .promo-choice__heart {
  color: #f33d69;
  font-size: 24px;
  line-height: 1;
}

body.cart-exact .promo-choice__input {
  height: 43px;
  padding: 0 13px;
  border: 1px solid #ebdce0;
  border-radius: 11px;
  outline: none;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 14px;
  color: #242021;
}

body.cart-exact .promo-choice__input:focus {
  border-color: #ffc2d0;
}

body.cart-exact .promo-choice__apply {
  height: 43px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef466d, #f23a66);
  color: #fff;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

body.cart-exact .promo-choice__apply:hover {
  filter: brightness(1.03);
}

body.cart-exact .promo-choice__apply.is-done {
  background: #58b86b;
}

body.cart-exact .promo-choice__success {
  margin: 11px 0 0 31px;
  color: #58b86b;
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease;
}

body.cart-exact .promo-choice.is-applied .promo-choice__success {
  opacity: 1;
  max-height: 36px;
}

body.cart-exact .promo-choice__benefit {
  margin: 0 10px 10px;
  padding: 16px 14px 11px;
  border: 1px solid #eee2e5;
  border-radius: 16px;
  background: #fffdfd;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.35s ease,
    max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s ease;
}

body.cart-exact .promo-choice.is-applied.has-benefit .promo-choice__benefit {
  opacity: 1;
  max-height: 520px;
  transform: none;
}

body.cart-exact .promo-choice__benefit h3 {
  margin: 0 0 14px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #242021;
}

body.cart-exact .promo-choice__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

body.cart-exact .promo-choice__option {
  position: relative;
  min-height: 222px;
  padding: 14px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #eadde1;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-family: Manrope, system-ui, sans-serif;
}

body.cart-exact .promo-choice__option.is-selected {
  border-color: #f33d69;
  box-shadow: 0 0 0 1px rgba(243, 61, 105, 0.12);
}

body.cart-exact .promo-choice__option-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #fff1f4;
  color: #f33d69;
  font-size: 14px;
}

body.cart-exact .promo-choice__option-icon--gold {
  background: #fff7df;
  color: #c99627;
}

body.cart-exact .promo-choice__option strong {
  font-size: 11px;
  font-weight: 700;
  color: #242021;
  line-height: 1.3;
}

body.cart-exact .promo-choice__option p {
  margin: 7px 0 0;
  min-height: 42px;
  color: #7d7477;
  font-size: 9.5px;
  line-height: 1.45;
}

body.cart-exact .promo-choice__option-value {
  margin: 7px 0 9px;
  min-height: 32px;
  color: #746b6e;
  font-size: 9.5px;
  line-height: 1.4;
}

body.cart-exact .promo-choice__option-btn {
  width: 100%;
  margin-top: auto;
  padding: 8px 7px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ef466d, #f23a66);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  cursor: pointer;
}

body.cart-exact .promo-choice__option-btn--gold {
  background: linear-gradient(135deg, #ffe9aa, #ffdd79);
  color: #40351e;
}

body.cart-exact .promo-choice__option-tag {
  position: absolute;
  top: -6px;
  right: 7px;
  padding: 5px 7px;
  border: 1px solid #e9d38e;
  border-radius: 8px;
  background: #fff9e7;
  color: #695a37;
  font-size: 7px;
  line-height: 1.25;
  font-weight: 600;
}

body.cart-exact .promo-choice__expire {
  margin-top: 10px;
  text-align: center;
  color: #8b8385;
  font-size: 9px;
}

body.cart-exact #promo-status {
  display: block;
  margin: 8px 0 0 31px;
  color: #f04f76;
  font-size: 11px;
  line-height: 1.4;
}

body.cart-exact .promo-choice__option:not(.is-selected) {
  border-color: #eadde1;
  box-shadow: none;
}

/* Promo auth modal — checkout overlay */
body.promo-auth-open {
  overflow: hidden;
}

.promo-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 24, 28, 0.42);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.promo-auth-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.promo-auth-modal {
  position: relative;
  width: min(100%, 420px);
  padding: 28px 26px 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(40, 24, 28, 0.18);
  border: 1px solid #f3e8eb;
  font-family: Manrope, system-ui, sans-serif;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.promo-auth-overlay.is-visible .promo-auth-modal {
  transform: none;
}

.promo-auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #faf3f5;
  color: #6a5a5e;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.promo-auth-modal__logo {
  display: block;
  height: 44px;
  width: auto;
  margin: 0 auto 18px;
}

.promo-auth-modal__title {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: #242021;
  text-align: center;
}

.promo-auth-modal__lead {
  margin: 0 0 18px;
  color: #7d7477;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.promo-auth-modal__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f3;
  color: #d63a62;
  font-size: 12px;
  line-height: 1.4;
}

.promo-auth-modal__error[hidden] {
  display: none !important;
}

.promo-auth-modal__form[hidden],
.promo-auth-profile[hidden],
.merary-auth-pane[hidden],
#headerAuthLogin[hidden],
#headerAuthLead[hidden],
.merary-auth-code-step__debug[hidden] {
  display: none !important;
}

.header-auth-modal {
  padding: 24px 22px 20px;
}

.header-auth-modal .promo-auth-modal__logo {
  height: 38px;
  margin-bottom: 8px;
}

.header-auth-modal .promo-auth-modal__title {
  font-size: clamp(22px, 4vw, 26px);
  margin-bottom: 6px;
}

.header-auth-modal .promo-auth-modal__lead {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.promo-auth-modal__form {
  display: grid;
  gap: 12px;
}

.promo-auth-modal__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6a5a5e;
}

.promo-auth-modal__field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ebdce0;
  border-radius: 12px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: #242021;
  background: #fffafb;
}

.promo-auth-modal__field input:focus {
  border-color: #ffc2d0;
  box-shadow: 0 0 0 3px rgba(240, 79, 119, 0.1);
}

.promo-auth-modal__hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #8b8385;
}

.promo-auth-modal__code-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.promo-auth-modal__link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f04f77;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.promo-auth-modal__link:disabled {
  color: #a89da1;
  cursor: default;
}

.promo-auth-modal__submit {
  margin-top: 4px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef466d, #f23a66);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.promo-auth-modal__submit:hover {
  filter: brightness(1.03);
}

.promo-auth-modal__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.promo-auth-modal__social {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f3e8eb;
}

.promo-auth-modal__social-title {
  margin-bottom: 10px;
  text-align: center;
  font-size: 12px;
  color: #8b8385;
}

.promo-auth-modal__social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.promo-auth-social {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 6px;
  border: 1px solid #eadde1;
  border-radius: 12px;
  background: #fff;
  color: #242021;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.promo-auth-social.is-disabled,
.promo-auth-social:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.promo-auth-social--tg {
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.promo-auth-social--tg iframe {
  width: 100% !important;
  min-height: 40px;
}

.promo-auth-profile {
  display: grid;
  gap: 14px;
}

.promo-auth-profile__title {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #242021;
  text-align: center;
}

.promo-auth-profile__rows {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #f0e3e7;
  border-radius: 14px;
  background: #fffafb;
}

/* Compact OAuth bar — TG widget + Google/VK brand buttons */
.merary-oauth-compact {
  display: grid;
  gap: 8px;
}

.merary-oauth-compact__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.merary-oauth-compact__cell {
  min-width: 0;
}

.merary-oauth-compact__cell > .merary-oauth-brand {
  width: 100%;
}

.merary-oauth-brand-wrap {
  position: relative;
  width: 100%;
  min-height: 44px;
}

.merary-oauth-brand-wrap > .merary-oauth-brand--telegram {
  width: 100%;
  min-height: 44px;
  pointer-events: none;
}

.merary-oauth-brand__widget {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  overflow: hidden;
  border-radius: 4px;
}

.merary-oauth-brand__widget iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  cursor: pointer;
}

.merary-oauth-brand {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 4px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, filter 0.15s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.merary-oauth-brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merary-oauth-brand:hover:not(.is-disabled):not(:disabled) {
  transform: translateY(-1px);
}

.merary-oauth-brand.is-disabled,
.merary-oauth-brand:disabled {
  opacity: 0.48;
  cursor: default;
  pointer-events: none;
}

.merary-oauth-brand__icon {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.merary-oauth-brand--telegram {
  border: 1px solid #229ed9;
  background: #2aabee;
  color: #fff;
  box-shadow: 0 1px 2px rgba(42, 171, 238, 0.24);
}

.merary-oauth-brand--telegram:hover:not(.is-disabled) {
  filter: brightness(1.04);
  box-shadow: 0 2px 8px rgba(42, 171, 238, 0.28);
}

.merary-oauth-brand--google {
  border: 1px solid #dadce0;
  background: #fff;
  color: #3c4043;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.merary-oauth-brand--google:hover:not(.is-disabled) {
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.16);
}

.merary-oauth-brand--vk {
  border: 1px solid #0077ff;
  background: #0077ff;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 119, 255, 0.24);
}

.merary-oauth-brand--vk:hover:not(.is-disabled) {
  filter: brightness(1.04);
  box-shadow: 0 2px 8px rgba(0, 119, 255, 0.28);
}

.merary-auth-code-step {
  display: grid;
  gap: 12px;
  text-align: center;
}

.merary-auth-back {
  justify-self: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #8a7078;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.merary-auth-back:hover {
  color: #ef5877;
}

.merary-auth-code-step__lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #5f5659;
}

.merary-auth-code-step__lead strong {
  color: #242021;
  word-break: break-all;
}

.merary-auth-code-step__debug {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff6f8;
  color: #c44562;
  font-size: 12px;
  font-weight: 600;
}

.merary-auth-otp {
  text-align: center !important;
  letter-spacing: 0.28em;
  font-size: 22px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
}

.header-auth-modal .merary-tg-login--compact {
  margin: 0;
  gap: 0;
  width: 100%;
}

.header-auth-modal .merary-oauth-compact__row {
  margin-bottom: 0;
}

.header-auth-modal .promo-auth-modal__social {
  margin-top: 12px;
  padding-top: 10px;
}

.header-auth-modal .promo-auth-modal__form {
  margin-top: 2px;
}

.header-auth-modal .promo-auth-modal__code-actions {
  justify-content: center;
}

/* legacy chips — keep for checkout promo if used */
.merary-oauth-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e4d6da;
  border-radius: 11px;
  background: #fff;
  color: #242021;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.merary-oauth-chip:hover:not(.is-disabled):not(:disabled) {
  background: #fff8fa;
  border-color: #efb8c6;
  transform: translateY(-1px);
}

.merary-oauth-chip.is-disabled,
.merary-oauth-chip:disabled {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

.merary-oauth-chip__icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.merary-oauth-chip--google .merary-oauth-chip__icon {
  background: #f4f6fb;
  color: #4285f4;
}

.merary-oauth-chip--vk .merary-oauth-chip__icon {
  background: #eef3fb;
  color: #2787f5;
}

.merary-oauth-chip--tg {
  width: 100%;
  border-color: #c8e8f7;
  background: #f4fbff;
  color: #229ed9;
}

.header-auth-modal .merary-tg-login--compact {
  margin: 0;
  gap: 0;
}

.header-auth-modal .merary-tg-login--compact .merary-tg-widget {
  width: 100%;
  display: flex;
  justify-content: center;
}

.header-auth-modal .merary-tg-login--compact .merary-tg-widget iframe {
  margin: 0 auto !important;
  max-width: 100%;
}

.header-auth-modal .promo-auth-modal__social {
  margin-top: 14px;
  padding-top: 12px;
}

.header-auth-modal .promo-auth-modal__form {
  margin-top: 4px;
}


.promo-auth-profile__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.promo-auth-profile__row span {
  color: #8b8385;
}

.promo-auth-profile__row strong {
  color: #242021;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 480px) {
  body.cart-exact .promo-choice__row {
    grid-template-columns: 20px 1fr;
  }

  body.cart-exact .promo-choice__apply {
    grid-column: 2;
  }

  body.cart-exact .promo-choice__grid {
    grid-template-columns: 1fr;
  }
}
